#ifndef CAMERA_H
#define CAMERA_H

#include "Vector.h"
#include <iostream>
using namespace std;

class Camera
{
public:
	//Constructors
    Camera();
	Camera(Scalar newMovementSpeed, Scalar newTurningSpeed, Vector newDirection, Vector newEyepoint, Vector newCameraPlane);

	//Destructor
    virtual ~Camera();

	//Moving operations
	void MoveForward();
	void MoveBackward();
	void MoveLeft();
	void MoveRight();
	void TurnLeft();
	void TurnRight();
	
	//Set the camera information
	void SetMovementSpeed(const Scalar& newMovementSpeed);
	void SetTurningSpeed(const Scalar& newTurningSpeed);
	void SetEyepoint(const Vector& newEyepoint);
	void SetDirection(const Vector& newDirection);
	void SetCameraPlane(const Vector& newCameraPlane);

	//Get the camera information
	const Scalar& GetMovementSpeed() const;
	const Scalar& GetTurningSpeed() const;
	const Vector& GetEyepoint() const;
	const Vector& GetDirection() const;
	const Vector& GetCameraPlane() const;

	//Print the information of the state of the camera. Function with debugging purpose.
	void PrintInfo()
	{
		cout << endl << "Camera information:" << endl << "-------------------" << endl;
		cout << "Position: " << eyepoint.GetX().GetValue() << ", " << eyepoint.GetY().GetValue() << endl;
		cout << "Direction: " << direction.GetX().GetValue() << ", " << direction.GetY().GetValue() << endl;
		cout << "Cameraplane: " << cameraPlane.GetX().GetValue() << ", " << cameraPlane.GetY().GetValue() << endl << endl;
	}

private:
	//Attributes of the camera
	Scalar movementSpeed;
	Scalar turningSpeed;
	Vector eyepoint;
	Vector direction;
	Vector cameraPlane;
};

#endif // CAMERA_H
